<template>
  <div class="payment">
    <div class="address">
      <x-input title="收货人" v-model="name" text-align='right' placeholder="请填写收货人姓名"></x-input>
      <x-input title="手机号码" v-model="phone" text-align='right' placeholder="请填写收货人手机号码"></x-input>
      <x-address title="省/市/区" v-model="province" :list="ChinaAddressV4Data" placeholder="请选择"></x-address>
      <x-input class="border-none" title="详细地址" v-model="address" text-align='right' placeholder="请输入街道，门牌等详细地址信息"></x-input>
    </div>
    <div class="goods">
      <div class="img">
        <img src="@/assets/pic8.png">
      </div>
      <div class="title">
        <p class="tip">Naef Cublex立方体创意魔创意魔...创意魔...创意魔...创意魔...</p>
        <p class="attr">型号：青少年型眼贴15对装</p>
        <p class="price">¥368 <span class="num">x1</span></p>
      </div>
    </div>
    <div class="goods-all border-none">
      <span class="all-title">商品合计</span>
      <span class="all-price">￥87.70</span>
    </div>
    <div class="fixed">
      <div class="left">
        <span class="fl">合计 <em>¥199.00</em></span>
      </div>
      <div class="right"><img src="@/assets/weixinzhifu.png" alt="" @click="router({path: './paySuccess'})"> 微信支付</div>
    </div>
  </div>
</template>

<script>
import { XInput, XAddress, ChinaAddressV4Data } from 'vux'
export default {
  components: {
    XInput,
    XAddress,
    ChinaAddressV4Data,  
  },
  data () {
    return {
      name: '',
      phone: '',
      address: '',
      province: [],
      ChinaAddressV4Data: ChinaAddressV4Data,
    }
  },
  created () {
  },
  methods: {    
    router (path) {
      this.$router.push(path)
    }
  }
}
</script>
<style lang="stylus" scoped>
.payment
  background-color #f2f2f2
  min-width 100vw
  min-height 100vh
  .address
    margin-bottom 1rem
    background-color #fff
    .weui-cell
      padding 0
      span
        font-size 1.5rem
        color #666
      .vux-cell-placeholder
        color #ccc
    .border-none
      border none !important
    .vux-x-input,.vux-cell-box
      padding 0
      line-height 5rem
      height 5rem
      overflow hidden
      margin 0 1.5rem
      border-bottom 1px solid #e5e5e5
      box-sizing border-box
      &::before
        display none
      label
        font-size 1.5rem
        color #666
      input
        font-size 1.5rem
        color #666
        height 5rem
        line-height 5rem
        &::-webkit-input-placeholder
          color #ccc
  .goods
    display flex
    background-color #fff
    margin-bottom 1rem
    padding 2rem 1.5rem
    .img
      width 12rem
      height 12rem
      margin-right 1.4rem
    .title
      position relative
      .tip
        font-size 1.5rem
        color #333
        width calc(100vw - 17rem)
        overflow hidden
        text-overflow ellipsis
        display -webkit-box
        -webkit-line-clamp 2
        -webkit-box-orient vertical
      .attr
        margin-top 1rem
        color #999
        font-size 1.2rem
      .price
        color #666
        font-size 1.7rem
        line-height 2.4rem
        position absolute
        bottom 0
        font-weight bold
        overflow hidden
        width 100%
        span
          float right
          line-height 2.4rem
    .num
      flex 1
      text-align right
      line-height 2.1rem
      font-size 1.5rem
      font-weight 500
  .goods-all
    background-color #fff
    line-height 5rem
    height 5rem
    display flex
    font-size 1.5rem
    padding 0 1.5rem
    border-bottom 1px solid #e5e5e5
    .all-title
      flex 1
      text-align left
      color #666
    .all-price
      flex 1
      text-align right
      color #333
      font-weight 500
      position relative
      img       
        position absolute
        width 2.2rem
        top 0
        right 6.9rem
        top 1.5rem
  .border-none
    border none
  .fixed
    position fixed
    bottom 0
    height 7rem
    line-height 7rem
    display flex
    width 100%
    background linear-gradient(0deg,rgba(255,255,255,1) 0%)
    padding 1rem
    box-sizing border-box
    .left
      flex 1
      font-size 1.5rem
      color #fff
      line-height 5rem
      height 5rem
      border-radius .4rem 0 0 .4rem
      background-color #171C26
      .fl
        margin-left 1.5rem
      em
        font-size 1.8rem
        font-weight bold
        line-height 5rem
        height 5rem
        display inline-block
    .right
      max-width 15rem
      min-width 15rem
      background-color #43A047
      color #fff
      font-size 1.8rem
      font-weight bold
      text-align center
      line-height 5rem
      border-radius 0 .4rem .4rem 0
      img
        display inline-block
        vertical-align middle
        position relative
        top -.1rem
        width 2.4rem
</style>